package com.kyle.silverbullet.client.controller;

import com.kyle.silverbullet.client.entity.User;
import com.kyle.silverbullet.client.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author kyle
 * @date 2020-07-23
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserServiceImpl userService;

    @GetMapping("/list")
    public List<User> getAll() {
        return userService.list();
    }
}
